<?php
// +----------------------------------------------------------------------
// | CLTPHP.Pro [系统设置分组模型]
// +----------------------------------------------------------------------
// | Copyright (c) 2019-2029 https://www.cltphp.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://www.cltphp.com/detail-140.html )
// +----------------------------------------------------------------------
// | Author: chichu <1109305987@qq.com>
// +----------------------------------------------------------------------
namespace app\common\model;

use think\facade\Request;

class SystemGroup extends Base
{
    // 定义时间戳字段名
    protected $createTime = 'create_time';
    protected $updateTime = 'update_time';

    // 一对多获取系统设置
    public function systems()
    {
        return $this->hasMany('System', 'group_id');
    }
    // 获取列表
    public static function getList($where = array(), $page, $order = ['sort', 'id'=>'desc']){
        $list = self::where($where)->order($order)
            ->paginate($page);

        return $list;
    }
}